package com.system.provider;

import com.am.ui.grid.AbstractBaseGridProvider;
import com.system.uitls.SearchFilter;
import java.util.Map;

public class DiseaseHistoryProvider extends AbstractBaseGridProvider
{
  public String generateSql(Map<String, Object> map)
  {
    StringBuffer sf = new StringBuffer("SELECT id,person_name,user_name,create_time,isnull(amount,0) as amount FROM sys_patient_record WHERE person_id=:personId AND status='7'");

    sf.append(SearchFilter.getSearchSql(map, null));

    sf.append(" ORDER BY create_time DESC");
    setParamMap(map);
    return sf.toString();
  }
}